#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
void Merge(int R[],int T[],int low,int mid,int high)
{
    int i=low,j=mid+1,k=low;
    while(i<=mid&&j<=high)
    {
        if(R[i]<=R[j]) T[k++]=R[i++];
        else T[k++]=R[j++];
    }
    while(i<=mid) T[k++]=R[i++];
    while(j<=high) T[k++]=R[j++];
    for(int i=low;i<=high;i++)
    {
        R[i]=T[i];
    }

}


void MSort(int R[],int T[],int low,int high)
{
        if(low==high) T[low]=R[low];
        else
        {
        int  mid=(low+high)/2;
        MSort(R,T,low,mid);
        MSort(R,T,mid+1,high);
        Merge(R,T,low,mid,high);
        };
}

int main()
{
    int n,i,*R,*T;
    scanf("%d",&n);
    R=new int[n];
    T=new int[n];
    for(i=0;i<n;i++)
        scanf("%d",&R[i]);
    MSort(R,T,0,n-1);
                for(int i=0;i<n;i++)
        printf("%d ",T[i]);
    printf("\n");
    return 0;
}

